<html>
<head><meta charset="utf-8"><title>Tracing doc (#409) · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html">Tracing doc (#409)</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198445403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198445403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bartłomiej Kuras <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198445403">(May 22 2020 at 14:09)</a>:</h4>
<p>What do you actually mean by "the next thing to do is just write docs so we know how to use it"? How to use tracing to log in place of regular log crate? I was using tracing before, so maybe I can do this, but I am not exactly sure what do you expect here. I just see some PR which is not even merged (and cannot be because of conflicts) and I am not exactly sure where to start with this (or maybe I should take a look at something else?).</p>



<a name="198446242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198446242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198446242">(May 22 2020 at 14:15)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/409#pullrequestreview-401362042">This comment</a> in that PR describes it better:</p>
<ul>
<li>How can you enable/view/configure tracing when running chalk (normally, but also when running tests)</li>
<li>How to write code using <code>debug</code>/<code>#[instrument]</code></li>
</ul>



<a name="198446340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198446340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198446340">(May 22 2020 at 14:16)</a>:</h4>
<p>And yeah, updating the book with this info will have to wait until that PR is merged</p>



<a name="198446712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198446712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198446712">(May 22 2020 at 14:19)</a>:</h4>
<p>Actually, the PR isn't merged yet mostly because it's not documented yet (alongside the question of whether tracing can be disabled when chalk is used as library)</p>



<a name="198447060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447060">(May 22 2020 at 14:22)</a>:</h4>
<blockquote>
<p>Actually, the PR isn't merged yet mostly because it's not documented yet (alongside the question of whether tracing can be disabled when chalk is used as library)</p>
</blockquote>
<p>Depends on what you mean. If the concern is that <code>tracing</code> ends up in rustc's dependency graph, then you're not really using features that are already available in log. if you're okay with <code>tracing</code> ending up in rustc's dependency graph, then tracing can pretend to be <code>log</code> to log-using consumers</p>



<a name="198447296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447296">(May 22 2020 at 14:23)</a>:</h4>
<p>(e.g., I'm not sure how you can replicate spans with log. if you're not using spans, a big value proposition of <code>tracing</code> is gone)</p>



<a name="198447305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447305">(May 22 2020 at 14:23)</a>:</h4>
<p>The first concern, that it ends up in rustc's dep graph</p>



<a name="198447359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447359">(May 22 2020 at 14:24)</a>:</h4>
<p>hrm</p>



<a name="198447526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447526">(May 22 2020 at 14:25)</a>:</h4>
<p>I'm guessing it's not simple to call to functions that switch between the old logging and tracing, since then you can't really use the attributes and such without creating an extra layer</p>



<a name="198447581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447581">(May 22 2020 at 14:26)</a>:</h4>
<p>no, and you're really just rebuilding <code>tracing</code></p>



<a name="198447587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447587">(May 22 2020 at 14:26)</a>:</h4>
<p>not sure that's a good use of effort</p>



<a name="198447667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447667">(May 22 2020 at 14:27)</a>:</h4>
<p>I guess I should bring up this value proposition that isn't documented well: if a binary/application (like rustc or something that is run through a <code>main</code> function) is using <code>tracing</code> subscribers and it _disables_ a tracing-enabled module/dependency, we've found that the performance of the resulting binary is non-trivially faster</p>



<a name="198447778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447778">(May 22 2020 at 14:28)</a>:</h4>
<p>e.g., Eliza switched h2 and hyper to use <code>tracing</code> and observed that the p99 latancies in linker2-proxy dropped by 2ms, from 3ms to 1ms.</p>



<a name="198447884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447884">(May 22 2020 at 14:29)</a>:</h4>
<p>I think it might be a good idea to _try_ a perf run where <code>log</code> is replaced with <code>tracing</code> in rustc</p>



<a name="198447962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198447962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198447962">(May 22 2020 at 14:30)</a>:</h4>
<p>(i'm assuming rustc uses <code>log</code>)</p>



<a name="198448245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198448245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198448245">(May 22 2020 at 14:33)</a>:</h4>
<p>I'm guessing this will require an MCP <em>anyways</em>, but i'd be good to get that data to inform <em>this</em></p>



<a name="198448278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198448278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198448278">(May 22 2020 at 14:33)</a>:</h4>
<p>Looking at the <code>Cargo.lock</code>, looks like it uses <code>log</code> and <code>log_settings</code></p>



<a name="198448643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198448643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198448643">(May 22 2020 at 14:36)</a>:</h4>
<p>Yeah, adding a dependency to rustc will probably need a MCP</p>



<a name="198448688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198448688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198448688">(May 22 2020 at 14:36)</a>:</h4>
<p>hmm</p>



<a name="198449088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198449088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198449088">(May 22 2020 at 14:40)</a>:</h4>
<p>I suppose I can hack up a PR and get ask to get a perf run going</p>



<a name="198455482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198455482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198455482">(May 22 2020 at 15:34)</a>:</h4>
<p>So I guess we have a few options:</p>
<ul>
<li>Start a MCP to introduce tracing in rustc (possibly doing a perf run beforehand)</li>
<li>Try to get rustc to accept tracing as a dependency (might require a MCP as well, but would be a smaller change)</li>
<li>Find a way to make tracing an optional dependency of chalk (which might take more work on our end, but makes it easier to integrate with rustc)</li>
</ul>



<a name="198455499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198455499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198455499">(May 22 2020 at 15:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> thoughts?</p>



<a name="198462845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198462845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198462845">(May 22 2020 at 16:27)</a>:</h4>
<p>What's tracing's compile time like?</p>



<a name="198463064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198463064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198463064">(May 22 2020 at 16:29)</a>:</h4>
<p>It might not be super controversial to add tracing as a transitive dependency</p>



<a name="198463219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198463219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198463219">(May 22 2020 at 16:30)</a>:</h4>
<p>Actually though, with that crate cleanup, if we can avoid any logging in chalk-ir itself (and also not depend on chalk-engine, which has logging), then we could probably avoid having tracing as a transitive dependency of <code>librustc_middle</code>, which is <em>really</em> the only questionable rustc crate</p>



<a name="198463663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198463663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198463663">(May 22 2020 at 16:34)</a>:</h4>
<p>Yeah, there are currently no calls to info! or debug! in chalk-ir (so I don't think any calls to tracing got added in the PR, but I haven't checked)</p>



<a name="198482136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198482136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198482136">(May 22 2020 at 19:06)</a>:</h4>
<p>the compile times should be at parity with <code>log</code>.</p>



<a name="198483508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483508">(May 22 2020 at 19:19)</a>:</h4>
<p>I don't know that it's a particularly big deal to have tracing as a transitive dep</p>



<a name="198483525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483525">(May 22 2020 at 19:19)</a>:</h4>
<p>it's more that I think eventually we want chalk and rustc to use the same basic logging infra</p>



<a name="198483595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483595">(May 22 2020 at 19:20)</a>:</h4>
<p>we do generally try to avoid adding random deps though</p>



<a name="198483621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483621">(May 22 2020 at 19:20)</a>:</h4>
<p>how hard would it be for chalk to use a feature or something to pick between <code>log!</code> and tracing?</p>



<a name="198483627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483627">(May 22 2020 at 19:20)</a>:</h4>
<p>I guess kind of hard</p>



<a name="198483650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198483650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198483650">(May 22 2020 at 19:20)</a>:</h4>
<p>if we want to leverage the various macros</p>



<a name="198485231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198485231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198485231">(May 22 2020 at 19:33)</a>:</h4>
<p>If you have it as a drop-in replacement, not hard at all. I've opened this PR on Hyper: <a href="https://github.com/hyperium/hyper/pull/2204">https://github.com/hyperium/hyper/pull/2204</a>.</p>
<p>I'm just not sure you're getting much out of tracing if you're not using spans to correlate events.</p>



<a name="198485812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198485812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198485812">(May 22 2020 at 19:39)</a>:</h4>
<p>the ideal would be that we get spans if using tracing</p>



<a name="198485815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198485815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198485815">(May 22 2020 at 19:39)</a>:</h4>
<p>and not otherwise :)</p>



<a name="198485829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198485829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198485829">(May 22 2020 at 19:39)</a>:</h4>
<p>but yeah I mean I think we probably just .. want spans</p>



<a name="198485941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198485941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198485941">(May 22 2020 at 19:40)</a>:</h4>
<p>seems worth creating an MCP or at least opening a topic in <a class="stream" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler">#t-compiler</a> to see what folks thing</p>



<a name="198486778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198486778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198486778">(May 22 2020 at 19:47)</a>:</h4>
<p>hmm, I guess the spans could be put behind _another_ macro, such that if <code>tracing</code> is disabled, the span annotations would be a no-op.</p>



<a name="198486903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198486903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198486903">(May 22 2020 at 19:48)</a>:</h4>
<p>I'll start a topic there and ask about what people would prefer/are willing to tolerate. I'll note the performance boost I've occasionally observed, if it sweetens the deal.</p>



<a name="198529608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198529608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bartłomiej Kuras <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198529608">(May 23 2020 at 10:42)</a>:</h4>
<p>Ok, then, for now, I think I would just finish the chalk book itself, and go through the PR. I think that hiding tracing behind a feature flag cannot be a bad idea, so I will do some additional changes to PR myself. After that I would think about updating rust book - maybe until then, there would be better consensus on how to process that in terms of rustc integration. At least unless there is something more important I can help with (but I think that for more important stuff I should finish the book anyway).</p>



<a name="198545822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Tracing%20doc%20%28%23409%29/near/198545822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Tracing.20doc.20(.23409).html#198545822">(May 23 2020 at 18:10)</a>:</h4>
<p>I've opened a discussion in <a class="stream-topic" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler/topic/Tracing.20in.20rustc">#t-compiler &gt; Tracing in rustc</a> .</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>